package com.bbs.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.bbs.po.Topic;

public interface TopicMapper {
  public int getTopicCount(@Param("forumid") int forumid);
  
  public List<Topic> getAllTopic(@Param("forumid") int forumid,@Param("pagestar") int pagestar,@Param("pageend") int pageend);
  
  public Topic getNewTopic(@Param("forumid") int forumid);
  
  public int saveTopic(Topic topic);
  
  public Topic getTopicById(@Param("topicid") int topicid);
  
  public List<Topic> allTopic(@Param("pagestar") int pagestar,@Param("pageend") int pageend);

  public List<Topic> search(@Param("title") String title);
  
  public int delete(@Param("id") Integer id);
  
  public int Count();
}
